const Mock = require('mockjs')

module.exports = {
    'get /stores'(req, res) {
        res.status(200).json(Mock.mock({
            'data': {
                'shop_num|100-1000': 0,
                'gx_shop_num|100-1000': 0,
                'xs_total|100-1000': 0,

                'shop|1-5': [{
                    'shop_number|+1': 1,
                    'shop_name': '美宜佳-' + '@cword(2)' + '店',
                    'shop_hangy': '百货',
                    'address': '@city()',
                    'Telephone': /^1[35678]{10}$/,
                    'PromotersId|+1': 100,
                    'Equity_level|1': [0, 1],
                    'Equity_time|1-100': 0,
                    'xiaoshou_e': '@float(100,1000,2,2)',
                    'yunying_stu|1': [0, 1],
                    'status|1': [0, 1],
                }],

                'options|1-5': [{
                    'value|+1': 1,
                    'label': '@cword(3)',
                }, ],

            },
            'message': '获取成功',
            'status': 200
        }))
    },




    //详情
    'post /stores/:id'(req, res) {
        // console.log(req.params.id);
        res.status(200).json(Mock.mock({
            'data': {
                'dp_id': req.params.id,
                'shop_name': '美宜佳-' + '@cword(2)' + '店',
                'hangye': ['林业', '百货', '装饰'],
                'sszh': /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
                'img': "@image('200x100', '#4A7BF7')",
            },
            'message': '获取成功',
            'status': 200
        }))
    }
}